﻿<Paragraph>
    <Image Source="@ImageSource" Text="@ImageTitle" @onclick="@OnModalOpenClick" Width="Width.Is50" Margin="Margin.Is3.FromTop.Is4.FromBottom" Shadow="Shadow.Default" />
</Paragraph>
<Modal @ref="@modalRef">
    <ModalContent Size="ModalSize.ExtraLarge">
        <ModalBody>
            <Image Source="@ImageSource" Text="@ImageTitle" @onclick="@OnModalCloseClick" Width="Width.Is100" />
        </ModalBody>
    </ModalContent>
</Modal>
@code {
    Modal modalRef;

    Task OnModalOpenClick()
    {
        return modalRef.Show();
    }

    Task OnModalCloseClick()
    {
        return modalRef.Hide();
    }

    [Parameter] public string ImageSource { get; set; }

    [Parameter] public string ImageTitle { get; set; }
}
